package com.crm.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.crm.dao.BizPartnerMapper;
import com.crm.model.BizPartner;
import com.crm.service.BizPartnerService;
import com.crm.util.UUIDUtil;

@Service
public class BizPartnerServiceImpl extends BaseServiceImpl<BizPartner> implements BizPartnerService{
	@Autowired
	private BizPartnerMapper bizPartnerMapper;
	
	@Override
	public int insert(BizPartner record) {
		
		String uuid = UUIDUtil.getUUID();
		record.setPartnerId(uuid);
		
		return super.insert(record);
	}

	@Override
	public BizPartner selectByPartnerId(String partnerId) {
		 return bizPartnerMapper.selectByPartnerId(partnerId);
	}

}
